Integrand size = 10, antiderivative size = 62 \[ \int \frac {\arctan (a+b x)}{x^2} \, dx=-\frac {a b \arctan (a+b x)}{1+a^2}-\frac {\arctan (a+b x)}{x}+\frac {b \log (x)}{1+a^2}-\frac {b \log \left (1+(a+b x)^2\right )}{2 \left (1+a^2\right )} \]
Result contains complex when optimal does not.
Time = 0.05 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.08 \[ \int \frac {\arctan (a+b x)}{x^2} \, dx=-\frac {\arctan (a+b x)}{x}+\frac {b (2 \log (x)+i (i+a) \log (i-a-b x)+(-1-i a) \log (i+a+b x))}{2 \left (1+a^2\right )} \]
-(ArcTan[a + b*x]/x) + (b*(2*Log[x] + I*(I + a)*Log[I - a - b*x] + (-1 - I *a)*Log[I + a + b*x]))/(2*(1 + a^2))
Time = 0.22 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.97, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.700, Rules used = {5568, 896, 25, 479, 452, 216, 240}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\arctan (a+b x)}{x^2} \, dx\) |
\(\Big \downarrow \) 5568 |
\(\displaystyle b \int \frac {1}{x \left ((a+b x)^2+1\right )}dx-\frac {\arctan (a+b x)}{x}\) |
\(\Big \downarrow \) 896 |
\(\displaystyle b \int \frac {1}{b x \left ((a+b x)^2+1\right )}d(a+b x)-\frac {\arctan (a+b x)}{x}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -b \int -\frac {1}{b x \left ((a+b x)^2+1\right )}d(a+b x)-\frac {\arctan (a+b x)}{x}\) |
\(\Big \downarrow \) 479 |
\(\displaystyle b \left (\frac {\log (-b x)}{a^2+1}-\frac {\int \frac {2 a+b x}{(a+b x)^2+1}d(a+b x)}{a^2+1}\right )-\frac {\arctan (a+b x)}{x}\) |
\(\Big \downarrow \) 452 |
\(\displaystyle b \left (\frac {\log (-b x)}{a^2+1}-\frac {a \int \frac {1}{(a+b x)^2+1}d(a+b x)+\int \frac {a+b x}{(a+b x)^2+1}d(a+b x)}{a^2+1}\right )-\frac {\arctan (a+b x)}{x}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle b \left (\frac {\log (-b x)}{a^2+1}-\frac {\int \frac {a+b x}{(a+b x)^2+1}d(a+b x)+a \arctan (a+b x)}{a^2+1}\right )-\frac {\arctan (a+b x)}{x}\) |
\(\Big \downarrow \) 240 |
\(\displaystyle b \left (\frac {\log (-b x)}{a^2+1}-\frac {a \arctan (a+b x)+\frac {1}{2} \log \left ((a+b x)^2+1\right )}{a^2+1}\right )-\frac {\arctan (a+b x)}{x}\) |
-(ArcTan[a + b*x]/x) + b*(Log[-(b*x)]/(1 + a^2) - (a*ArcTan[a + b*x] + Log [1 + (a + b*x)^2]/2)/(1 + a^2))
3.1.49.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x ^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
Int[((c_) + (d_.)*(x_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[c Int[1/ (a + b*x^2), x], x] + Simp[d Int[x/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c^2 + a*d^2, 0]
Int[1/(((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)), x_Symbol] :> Simp[d*(Log [RemoveContent[c + d*x, x]]/(b*c^2 + a*d^2)), x] + Simp[b/(b*c^2 + a*d^2) Int[(c - d*x)/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x]
Int[((a_) + (b_.)*(v_)^(n_))^(p_.)*(x_)^(m_.), x_Symbol] :> With[{c = Coeff icient[v, x, 0], d = Coefficient[v, x, 1]}, Simp[1/d^(m + 1) Subst[Int[Si mplifyIntegrand[(x - c)^m*(a + b*x^n)^p, x], x], x, v], x] /; NeQ[c, 0]] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && IntegerQ[m]
Int[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m _), x_Symbol] :> Simp[(e + f*x)^(m + 1)*((a + b*ArcTan[c + d*x])^p/(f*(m + 1))), x] - Simp[b*d*(p/(f*(m + 1))) Int[(e + f*x)^(m + 1)*((a + b*ArcTan[ c + d*x])^(p - 1)/(1 + (c + d*x)^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x ] && IGtQ[p, 0] && ILtQ[m, -1]
Time = 0.10 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.98
method | result | size |
derivativedivides | \(b \left (-\frac {\arctan \left (b x +a \right )}{b x}-\frac {\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{2}+a \arctan \left (b x +a \right )}{a^{2}+1}+\frac {\ln \left (-b x \right )}{a^{2}+1}\right )\) | \(61\) |
default | \(b \left (-\frac {\arctan \left (b x +a \right )}{b x}-\frac {\frac {\ln \left (1+\left (b x +a \right )^{2}\right )}{2}+a \arctan \left (b x +a \right )}{a^{2}+1}+\frac {\ln \left (-b x \right )}{a^{2}+1}\right )\) | \(61\) |
parts | \(-\frac {\arctan \left (b x +a \right )}{x}+b \left (\frac {\ln \left (x \right )}{a^{2}+1}-\frac {b \left (\frac {\ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{2 b}+\frac {a \arctan \left (\frac {2 b^{2} x +2 a b}{2 b}\right )}{b}\right )}{a^{2}+1}\right )\) | \(82\) |
parallelrisch | \(\frac {-2 x \arctan \left (b x +a \right ) a^{2} b^{2}+2 b^{2} \ln \left (x \right ) a x -b^{2} \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right ) a x -2 \arctan \left (b x +a \right ) a^{3} b -2 \arctan \left (b x +a \right ) a b}{2 x a b \left (a^{2}+1\right )}\) | \(91\) |
risch | \(\frac {i \ln \left (1+i \left (b x +a \right )\right )}{2 x}-\frac {i \left (a^{2} \ln \left (1-i \left (b x +a \right )\right )+\ln \left (1-i \left (b x +a \right )\right )-i \ln \left (\left (-a^{2} b +3 i a b \right ) x -3 a +2 i a^{2}-a^{3}\right ) b x +\ln \left (\left (-a^{2} b +3 i a b \right ) x -3 a +2 i a^{2}-a^{3}\right ) a b x -i \ln \left (\left (-a^{2} b -3 i a b \right ) x -3 a -2 i a^{2}-a^{3}\right ) b x +2 i \ln \left (x \right ) b x -\ln \left (\left (-a^{2} b -3 i a b \right ) x -3 a -2 i a^{2}-a^{3}\right ) a b x \right )}{2 x \left (i+a \right ) \left (a -i\right )}\) | \(210\) |
Time = 0.28 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.92 \[ \int \frac {\arctan (a+b x)}{x^2} \, dx=-\frac {b x \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right ) - 2 \, b x \log \left (x\right ) + 2 \, {\left (a b x + a^{2} + 1\right )} \arctan \left (b x + a\right )}{2 \, {\left (a^{2} + 1\right )} x} \]
-1/2*(b*x*log(b^2*x^2 + 2*a*b*x + a^2 + 1) - 2*b*x*log(x) + 2*(a*b*x + a^2 + 1)*arctan(b*x + a))/((a^2 + 1)*x)
Result contains complex when optimal does not.
Time = 0.64 (sec) , antiderivative size = 168, normalized size of antiderivative = 2.71 \[ \int \frac {\arctan (a+b x)}{x^2} \, dx=\begin {cases} - \frac {i b \operatorname {atan}{\left (b x - i \right )}}{2} - \frac {\operatorname {atan}{\left (b x - i \right )}}{x} - \frac {i}{2 x} & \text {for}\: a = - i \\\frac {i b \operatorname {atan}{\left (b x + i \right )}}{2} - \frac {\operatorname {atan}{\left (b x + i \right )}}{x} + \frac {i}{2 x} & \text {for}\: a = i \\- \frac {2 a^{2} \operatorname {atan}{\left (a + b x \right )}}{2 a^{2} x + 2 x} - \frac {2 a b x \operatorname {atan}{\left (a + b x \right )}}{2 a^{2} x + 2 x} + \frac {2 b x \log {\left (x \right )}}{2 a^{2} x + 2 x} - \frac {b x \log {\left (a^{2} + 2 a b x + b^{2} x^{2} + 1 \right )}}{2 a^{2} x + 2 x} - \frac {2 \operatorname {atan}{\left (a + b x \right )}}{2 a^{2} x + 2 x} & \text {otherwise} \end {cases} \]
Piecewise((-I*b*atan(b*x - I)/2 - atan(b*x - I)/x - I/(2*x), Eq(a, -I)), ( I*b*atan(b*x + I)/2 - atan(b*x + I)/x + I/(2*x), Eq(a, I)), (-2*a**2*atan( a + b*x)/(2*a**2*x + 2*x) - 2*a*b*x*atan(a + b*x)/(2*a**2*x + 2*x) + 2*b*x *log(x)/(2*a**2*x + 2*x) - b*x*log(a**2 + 2*a*b*x + b**2*x**2 + 1)/(2*a**2 *x + 2*x) - 2*atan(a + b*x)/(2*a**2*x + 2*x), True))
Time = 0.28 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.24 \[ \int \frac {\arctan (a+b x)}{x^2} \, dx=-\frac {1}{2} \, b {\left (\frac {2 \, a \arctan \left (\frac {b^{2} x + a b}{b}\right )}{a^{2} + 1} + \frac {\log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{2} + 1} - \frac {2 \, \log \left (x\right )}{a^{2} + 1}\right )} - \frac {\arctan \left (b x + a\right )}{x} \]
-1/2*b*(2*a*arctan((b^2*x + a*b)/b)/(a^2 + 1) + log(b^2*x^2 + 2*a*b*x + a^ 2 + 1)/(a^2 + 1) - 2*log(x)/(a^2 + 1)) - arctan(b*x + a)/x
\[ \int \frac {\arctan (a+b x)}{x^2} \, dx=\int { \frac {\arctan \left (b x + a\right )}{x^{2}} \,d x } \]
Time = 1.11 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.02 \[ \int \frac {\arctan (a+b x)}{x^2} \, dx=-\frac {\mathrm {atan}\left (a+b\,x\right )}{x}-\frac {\frac {b\,x\,\ln \left (a^2+2\,a\,b\,x+b^2\,x^2+1\right )}{2}-b\,x\,\ln \left (x\right )+a\,b\,x\,\mathrm {atan}\left (a+b\,x\right )}{x\,\left (a^2+1\right )} \]